import request from '../utils/request';//导入帮助类里面的request对象，帮助我们发送请求给后端api接口
//表单列表（表单分页组合查询）
export const getFormList = query => {
    return request({
        url: '/api/Form',
        method: 'get',//get请求用params
        params: query
    });
};

//表单添加
export const AddForm = query => {
    return request({
        url: '/api/Form',
        method: 'post',//get请求用params
        data: query
    });
};
//表单删除(单删)
export const DeleteForm = query => {
    return request({
        url: '/api/Form?id='+query,
        method: 'delete',
    });
};
//表单删除（批删）
export const AllDeleteForm = query => {
    return request({
        url: '/api/Form/all',
        method: 'delete',
        data:query,
    });
};
//表单根据Id查找数据
export const QueryIdForm = query => {
    return request({
        url: '/api/Form/id?id='+query,
        method: 'get',
    });
};
//表单修改
export const UpdateForm = query => {
    return request({
        url: '/api/Form',
        method: 'put',
        data: query
    });
};

